package com.qf.service.impl;
import com.qf.mapper.UserMapper;
import com.qf.pojo.User;
import com.qf.pojo.userbook;
import com.qf.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;



@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;
    @Override
    public List<User> findAll() {
        return  userMapper.findAll();
    }

    @Override
    public User findByUid(Integer uid) {
        return userMapper.findByUid(uid);
    }

    @Override
    public User login(String username, String password) {
        return userMapper.login(username,password);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public int delete(int uid) {
        return userMapper.delete(uid);
    }

    @Override
    public User selectuserbyusername(String username) {
        return userMapper.selectuserbyusername(username);
    }

    @Override
    public int tiajiashu(userbook userbook) {
        return userMapper.tiajiashu(userbook);
    }


}
